---@diagnostic disable: lowercase-global, undefined-global, trailing-space

local modid = 'yuemiheng'

local data = _require('core_'..modid..'/data/containers')

API.CONTAINER:main(data)

AddClassPostConstruct('widgets/containerwidget', function (self)
    local function clientwidget(unique_tag)
        if self.container and self.container.replica.container then
            local widget = self.container.replica.container:GetWidget()
            local unique = widget and widget.unique
            if unique and unique == unique_tag then
                return widget
            end
        end
        return false
    end

    local old_Open = self.Open
    function self:Open(...)
        old_Open(self, ...)
        local glove_widget = clientwidget('yuemiheng_cape')
        if glove_widget then
            self.bganim:SetScale(1,2.6,1)
            -- self.bganim:GetAnimState():SetMultColour(.5,.1,.1,1)
        end
    end

end)